<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>demo 2-32</title>
	</head>
	<body>
	</body>
	<script>
		function join(){
			var str = "";
			for(var i = 0;i < arguments.length;i++){
				if(i == 0){
					str = arguments[i];
				}else{
					str += "|" + arguments[i];
				}
			}
			return str;
		}
		console.log(join("hello","world"));
		function join2(...strs){
			var str = "";
			for(var i =0;i<strs.length;i++){
				if(i == 0){
					str = strs[i];
				}else{
					str += "|" + strs[i];
				}
			}
		return str;
		}
	</script>
</html>